
<link rel="stylesheet" type="text/css" href="<@baseUrl url='/static/comm/plugins/ztree/css/zTreeStyle/zTreeStyle.css'/>">
<script src="<@baseUrl url='/static/comm/plugins/ztree/js/jquery.ztree.all.js'/>"></script>
<!--<script src="<@baseUrl url='/static/comm/plugins/ztree/js/jquery.ztree.all.js'/>"></script>-->
<script src="<@baseUrl url='/static/js/util/util.js'/>"></script>

<script type="text/javascript">
    AppComm.include.load("<@baseUrl url='/static/comm/js/manager/roleManager.js'/>","js");
    AppComm.include.load("<@baseUrl url='/static/comm/js/unit/ztreeUnit.js'/>","js");
</script>

<!--<div class="animated fadeIn">-->
<div class="layui-tab-item layui-show">
    <!--系统管理 / 角色管理-->
    <!--<div style="text-align: left;">-->
        <!--<span class="layui-breadcrumb">-->
                <!--<a href="">系统管理</a>-->
                <!--<a><cite>角色管理</cite></a>-->
        <!--</span>-->
    <!--</div>-->
    <!--<hr>-->
    <div class="roleManager_box"></div>
</div>
<script id="roleManagerList_template" type="text/html">
    <div style="text-align: left;">
        <form class="layui-form" lay-filter="searchForm" action="">
            <div class="layui-inline">
                <!--<label class="layui-form-label">关键字</label>-->
                <div class="layui-input-inline">
                    <input name="nameInput" type="text" placeholder="角色名称" class="layui-input" style="width:200px;">
                </div>
            </div>
            <div class="layui-inline">
                &nbsp;&nbsp;
                <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="searchBtn">查询</button>
                <@hasPermission key="roleManager:add" html="<button class='layui-btn layui-btn-sm layui-btn-normal' id='addBtn'>添加</button>"/>
<#--                #hasPermission('roleManager:add','<button class="layui-btn layui-btn-normal" id="addBtn">添加</button>')-->
            </div>
        </form>
    </div>

    <div style="margin-right: 10px;">
        <table id="tb_list" lay-filter="tb_list"></table>
    </div>
</script>

<script type="text/html" id="toolbar">
    <@hasPermission key="roleManager:add" html='<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="editBtn">编辑</a>'/>
    <@hasPermission key="roleManager:add" html='<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="menuBtn">菜单授权</a>'/>
    <@hasPermission key="roleManager:add" html="<a class='layui-btn layui-btn-primary layui-btn-xs' lay-event='operateBtn'>操作授权</a>"/>
    <@hasPermission key="roleManager:add" html='<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="deleteBtn">删除</a>'/>
</script>

<script id="roleManagerForm_template" type="text/html">
    <form class="layui-form site-block" action="" style="height: 650px;">
        <div class="layui-tab-item layui-show" style="width:692px;margin: 0 auto;">
            <input type="hidden" id="id" value="{{id}}" lay-verify="id">
            <div class="layui-form-item">
                <!--<div class="layui-inline" id="roleKey_div">-->
                    <!--<label class="layui-form-label">角色关键字</label>-->
                    <!--<div class="layui-input-inline">-->
                        <!--<input type="text" id="roleKey" name="roleKey" required  lay-verify="roleKey" placeholder="请输入角色关键字" autocomplete="off" class="layui-input" value="{{roleKey}}">-->
                    <!--</div>-->
                <!--</div>-->
                <div class="layui-inline">
                    <label class="layui-form-label">角色名称</label>
                    <div class="layui-input-inline">
                        <input type="text" id="roleName" name="roleName" lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input" value="{{roleName}}">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">所属组织</label>
                    <div class="layui-input-inline" style="margin-top: 10px;">
                        <input type="hidden" id="groupId" name="groupId" lay-verify="groupId" autocomplete="off" value="{{groupId}}">
                        <span style="display:none" id="groupNameInput"><input type="text" id="groupName" name="groupName" placeholder="请选择组织" autocomplete="off" class="layui-input" value="{{groupName}}"></span>
                        <span style="display:none" id="groupNameShow">{{groupName}}</span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">排序号</label>
                    <div class="layui-input-inline">
                        <input style="width:512px;" type="text" id="orderId" name="orderId" lay-verify="orderId" placeholder="请输入序号" autocomplete="off" class="layui-input" value="{{orderId}}" >
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">说明</label>
                    <div class="layui-input-inline">
                        <textarea style="width: 512px;" placeholder="请输入内容" id="comment" name="comment" lay-verify="comment" class="layui-textarea">{{comment}}</textarea>
                    </div>
                </div>
            </div>
            <br>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-left: 225px;width:182px;">
                    <@hasPermission key="roleManager:save" html='<a id="saveBtn" class="layui-btn layui-btn-primary layui-btn-sm" lay-event="saveBtn">提交</a>'/>
                    <button class="layui-btn layui-btn-primary layui-btn-sm" id="cancelBtn">取消</button>
                </div>
            </div>
        </div>
    </form>
</script>

<!--菜单授权页-->
<script id="roleManagerForm_ztree" type="text/html">
    <div style="margin-left: 24px;">
        <input type="hidden" id="dataId" value="{{dataId}}" >
        <ul id="treeDemo" class="ztree"></ul>
    </div>
</script>
<!--操作授权页-->
<script id="roleManagerList_operation" type="text/html">
    <div id="transfer"></div>
</script>

<!--组织选择页-->
<script id="roleManagerList_group" type="text/html">
    <div style="text-align: left;margin: 10px;">
        <form class="layui-form" lay-filter="searchGroupForm" action="">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input name="groupNameInput" type="text" placeholder="组织名称" class="layui-input" style="width:200px;">
                </div>
            </div>
            <div class="layui-inline">
                &nbsp;&nbsp;
                <button class="layui-btn layui-btn-primary layui-btn-sm" lay-submit lay-filter="searchGroup">查询</button>
            </div>
        </form>
    </div>
    <div style="margin: 10px;">
        <table id="group_list" lay-filter="group_list" ></table>
    </div>
</script>